home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5003 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Migrate & Compile C to  C++ with MS Visual C++ 4.0 compiler
  5. Date: 2 Feb 1996 00:29:19 GMT
  6. Organization: Kalevi, Inc.
  7. Message-ID: <4erlsv$pb7@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: pipe8.h1.usa.pipeline.com
  9. X-PipeUser: grantp
  10. X-PipeHub: usa.pipeline.com
  11. X-PipeGCOS: (Pete)
  12. X-Newsreader: Pipeline USA v3.3.0
  13.  
  14. On Feb 01, 1996 23:04:18 in article <Migrate & Compile C to  C++ with MS
  15. Visual C++ 4.0 compiler>, 'mtmolin@srv.PacBell.COM (Miguel Molina)' wrote: 
  16.  
  17.  
  18. >Help appreciated: 
  19. >I am moving some C programs to C++ and I am going to use 
  20. >MS Visual C++ 4.0 to accomplish it. I have run into some 
  21. >problems and I would appeciate if someone that has done this 
  22. >can help. 
  23. >I  am having problems recompiling the C code with this compiler. 
  24. >I am trying to replace "malloc" containing statements with 
  25. >"new". the compiler does not recognize "new" as a valid 
  26. >identifier. I am not able to locate any meaningful information 
  27. >in MS CDROM. 
  28.  
  29. C++ compiler doesn't recognize operator new?? Not a chance. 
  30. Here's a possibility:  Your files have extension .c.  If so, the 
  31. compiler assumes they are straight C files and invokes the 
  32. compiler in C mode.  To compile as a C++ file, change the 
  33. file extension to .cpp. 
  34.  
  35. BTW, I thought there was an option as in BC++ systems that 
  36. allows an override of this convention, but didn't find it.  It's 
  37. probably there somewhere. 
  38.  
  39. -- 
  40. Pete Grant 
  41. Kalevi, Inc. 
  42. Object Oriented Software Development
  43.